package com.eascs.web.o2o.scheduler.task;

import javax.inject.Inject;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import com.eascs.app.log.Logger;
import com.eascs.app.log.LoggerFactory;
import com.eascs.common.util.StopWatch;
import com.eascs.web.o2o.scheduler.service.SynchroCrm;

/**
      crm：与crm相关的定时任务，并且数据落库在crm中
 */
@Component("CrmSynchroTask")
public class CrmSynchroTask {
	protected final Logger logger = LoggerFactory.getLogger(getClass());

	@Inject
	SynchroCrm		synchroCrm;
	
	/**
	 * crm数据同步
	 * 直连oracle,不需要再同步
	 * 2016年6月3日
	 */
	//@Scheduled(cron = "0 30 0  * * ?")
	public void saveCrmJob() {
		logger.info("crm数据同步任务开始......");
		StopWatch stopWatch = new StopWatch();
		synchroCrm.saveData();
		logger.info("crm数据同步任务结束，共耗时：[{}]分", stopWatch.elapsedTime() / 60000);
	}

	
	
}
